// ================alert 移除 折叠 全屏 开始====================
+function (n) {
    "use strict";
    function u(i) {
        return this.each(function () {
            var r = n(this)
                , u = r.data("bs.alert");
            u || r.data("bs.alert", u = new t(this));
            "string" == typeof i && u[i].call(r)
        })
    }

    var i = '[data-dismiss="alert"]', t = function (t) {
        n(t).on("click", i, this.close)
    }, r;
    t.VERSION = "3.3.1";
    t.TRANSITION_DURATION = 150;
    t.prototype.close = function (i) {
        function e() {
            r.detach().trigger("closed.bs.alert").remove()
        }

        var f = n(this), u = f.attr("data-target"), r;
        u || (u = f.attr("href"),
            u = u && u.replace(/.*(?=#[^\s]*$)/, ""));
        r = n(u);
        i && i.preventDefault();
        r.length || (r = f.closest(".alert"));
        r.trigger(i = n.Event("close.bs.alert"));
        i.isDefaultPrevented() || (r.removeClass("in"),
            n.support.transition && r.hasClass("fade") ? r.one("bsTransitionEnd", e).emulateTransitionEnd(t.TRANSITION_DURATION) : e())
    }
    ;
    r = n.fn.alert;
    n.fn.alert = u;
    n.fn.alert.Constructor = t;
    n.fn.alert.noConflict = function () {
        return n.fn.alert = r,
            this
    }
    ;
    n(document).on("click.bs.alert.data-api", i, t.prototype.close)
}(jQuery);
// ================alert 移除 折叠 全屏 结束====================

// ================== Widgets面板 开始=========================
(function InitiateWidgets() {
    $('.widget-header *[data-toggle="maximize"]').on("click", function (n) {
        n.preventDefault();
        var t = $(this).parents(".widget").eq(0)
            , i = $(this).find("i").eq(0)
            , r = "fa-compress"
            , u = "fa-expand";
        t.hasClass("maximized") ? (i && i.addClass(u).removeClass(r),
            t.removeClass("maximized"),
            t.find(".widget-body").css("height", "auto")) : (i && i.addClass(r).removeClass(u),
            t.addClass("maximized"),
            maximize(t))
    });
    $('.widget-header *[data-toggle="collapse"]').on("click", function (n) {
        n.preventDefault();
        var t = $(this).parents(".widget").eq(0)
            , r = t.find(".widget-body")
            , i = $(this).find("i")
            , u = "fa-angle-down"
            , f = "fa-angle-up"
            , e = 300;
        t.hasClass("collapsed") ? (i && i.addClass(f).removeClass(u),
            t.removeClass("collapsed"),
            r.slideUp(0, function () {
                r.slideDown(e)
            })) : (i && i.addClass(u).removeClass(f),
            r.slideUp(200, function () {
                t.addClass("collapsed")
            }))
    });
    $('.widget-header *[data-toggle="dispose"]').on("click", function (n) {
        n.preventDefault();
        var i = $(this)
            , t = i.parents(".widget").eq(0);
        t.hide(300, function () {
            t.remove()
        })
    })
})();
// ================== Widgets面板 结束=========================